import {getBrandList} from '@/api/brand.js'
import {getCategoryWithChildren} from '@/api/category.js'

let productMixin={
	data(){
		return{
			catList:[],
			cateList:[]
		}
	},
	methods:{
		getCatListByQuery(){
			getBrandList({
				pageNum:1,
				pageSize:100
			})
			.then(resp=>{
				this.catList=resp.data.data.list;
			})
		},
		getCateList() {
			///productCategory/list/withChildren
			getCategoryWithChildren().
			then(resp => {
				this.cateList = resp.data.data;
			})
		}
	},
	mounted(){
		this.getCatListByQuery();
		this.getCateList();
	}
}

export default productMixin